#ifndef __BLACK_DEFAULT_H__
#define __BLACK_DEFAULT_H__

#include <math.h>

#ifndef bCUSTOM_CONFIG
# define bSSE
# define bSSE2
# define bSSE3
# define fEPSILON 0.0001f
# define bCUSTOM_CONFIG
//# define bMINIMIZE_BRANCHING
#endif

#ifdef bSSE
# include <xmmintrin.h>
#endif
#ifdef bSSE2
# include <emmintrin.h>
#endif
#ifdef bSSE3
# include <pmmintrin.h>
#endif


namespace black
{

#if defined(_MSC_VER)
# define bMVISUAL
#elif defined(__GNUC__) || defined(__GNUWIN32__)
# define bGCC
#elif defined(__BORLAND__)
# define bBORLAND
#endif

#if defined( bGCC )
# if defined( bSSE ) && !defined( __SSE__ )
#  warning SSE not enabled in the compiler options but the macro bSSE was specified
#  undef bSSE
# endif
# if defined( bSSE2 ) && !defined( __SSE2__ )
#  warning SSE2 not enabled in the compiler options but the macro bSSE2 was specified
#  undef bSSE2
# endif
# if defined( bSSE3 ) && !defined( __SSE3__ )
#  warning SSE3 not enabled in the compiler options but the macro bSSE3 was specified
#  undef bSSE3
# endif
#endif

//#define bCOMPILER_AUTO_SSE

// Inline
#ifdef bMVISUAL
 #define bINLINE		__inline
 #define bFORCEINLINE	__forceinline
#else
 #define bINLINE		inline
 #define bFORCEINLINE	inline
#endif

// Debug
#ifdef _DEBUG
 #define bDEBUG
#endif

// Align
#ifdef bGCC
# define bALIGN16		__attribute__((aligned (16)))
#else
# define bALIGN16		__declspec(align(16))
#endif

#if defined( bSSE2 ) && !defined( bSSE )
# define bSSE
#endif

#define _bTOSTRING( x )	# x
#define bTOSTRING( x )	_bTOSTRING( x )

#if defined bMVISUAL
# define bTODO( sMsg )				__pragma( message( __FILE__ "(" bTOSTRING(__LINE__) ") : [[ TODO ]] " sMsg ) )
#elif defined bWII || defined bNDS
# define bPRAGMA_COMMAND_CW( oCmd )	_Pragma( #oCmd )
# define bTODO( sMsg )				bPRAGMA_COMMAND_CW( message("[[ TODO ]] " sMsg) )
#else
# define bTODO( sMsg )
#endif

#define bNEEDS_BENCHMARK /*__FUNCTION__*/

#define bNEEDS_TESTS /*__FUNCTION__*/

#define bWIP( x )

#if defined bMVISUAL
# define	bDEPRECATED( sMsg ) __declspec( deprecated( sMsg ) )
#endif

#define bCOPYRIGHT( sWho, sCompany, sWhere )

}

#endif // __BLACK_DEFAULT_H__

//---------------------------------------------------------------------------------------
// Copyright (c) 2009 Jounayd Id Salah.
// All rights reserved.
//---------------------------------------------------------------------------------------
